package everyday;

import java.util.Arrays;

public class T2451 {
    public String oddString(String[] words) {
        int[] w0 = get(words[0]);
        int[] w1 = get(words[1]);
        if (Arrays.equals(w0,w1)){
            for (int i = 2; i <words.length ; i++) {
                if (!Arrays.equals(w0,get(words[i]))){
                    return words[i];
                }
            }
        }
        return Arrays.equals(w0,get(words[2]))?words[1]:words[0];
    }

    public int[] get(String word) {
        int n = word.length();
        int[] res = new int[n - 1];
        for (int i = 1; i < n; i++) {
            res[i - 1] = word.charAt(i) - word.charAt(i - 1);
        }
        return res;
    }
}
